-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MR-886] Upgrade react-scripts to v5 #914
Conversation
Bumps [react-scripts](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-scripts) from 4.0.3 to 5.0.0. - [Release notes](https://github.com/facebook/create-react-app/releases) - [Changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/create-react-app/commits/react-scripts@5.0.0/packages/react-scripts) --- updated-dependencies: - dependency-name: react-scripts dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
… webpack 5 friendly export artifacts
… react-scripts 4.x" This reverts commit 99142f0.
…eps from react-scripts 4.x"" This reverts commit e322691.
…ter to avoid react-router conflict
…tly referencing Submission2
This reverts commit 0aab907.
@@ -89,28 +89,29 @@ | |||
"dayjs": "^1.10.5", | |||
"formik": "^2.2.9", | |||
"graphql": "^16.2.0", | |||
"history": "^5.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new temp dependency - added until we complete react-router upgrade to address types clashing. After upgrade it will be removed again. reason for this is described more in programming notes.
"react": "^17.0.2", | ||
"react-aria-modal": "^4.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an unused dependency
"@storybook/addon-a11y": "^6.5.0-alpha.61", | ||
"@storybook/addon-essentials": "^6.5.0-alpha.61", | ||
"@storybook/addon-links": "^6.5.0-alpha.61", | ||
"@storybook/builder-webpack5": "^6.5.0-alpha.61", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new temp dependencies - only on prerelease until we complete react-router upgrade. Then we can go back down. reasoning described more in programming notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. You've got some Prisma lambda layer changes hanging out in this PR that doesn't seem related to the react-scripts upgrade, IDK where they came from or if they are right.
run: | | ||
tar -C ./services/app-api/lambda-layers-prisma-client-migration -xf ./services/app-api/lambda-layers-prisma-client-migration/nodejs.tar.gz | ||
rm -rf ./services/app-api/lambda-layers-prisma-client-migration/nodejs.tar.gz | ||
|
||
- uses: actions/download-artifact@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this change in the react-scripts PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this came in with adf1882. @mojotalantikite @macrael does that commit look alright to yall just sanity check because we had a bit of funky stuff with app-web merge at least want to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So yeah, with the webpack5 changes there was a change in behavior that stopped prisma from working again. Basically it was copying in parts of the prisma client, but not any of the engine things that it needs.
In order to get it working again I added a single layer that has the prisma packages and forced webpack to not pack up prisma. That way the resolutions for prisma go to the lambda layer, which have the appropriate query engine builds.
}) | ||
let testLocation: Location | ||
|
||
renderWithProviders( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I see this function it makes me happy. @haworku this testing function is brilliant, giving us usable defaults and making it easy to customize things per-test.
cypress is failing with errors I haven't seen before 🔍 . Its also happening locally and pointing to where we import |
Unfortunately had to comment out our accessibility automation Will make a ticket before end of day to capture this issue and put at top of pilot backlog. It might just be we need to probably isolate the tests folder (and cypress) in its own service in packages, instead of where it is sitting now. The way things are set up now, with deps in the root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good
I say ship it! But reminder that we'll have to swap the |
Summary
Upgrade react-scripts (used to build create react app) to version 5. This is built on webpack 5
Notes:
cy.pa11y
calls for now to get this work through.Known compile warnings with this major version upgrade:
Related issues
https://qmacbis.atlassian.net/browse/MR-886
Screenshots
Test cases covered
app-web
tests that reference the browser location were modified to use this pattern.QA guidance